package main

import (
	"./BlockChain"
	"fmt"
	"time"
)
func main() {
	block := BlockChain.NewBlock(1, []byte("create block"), []byte{0,0,0,0})
	//打印区块信息
	fmt.Printf("区块的高度：%d\n", block.Height)
	fmt.Printf("交易数据：%s\n", block.Data)
	fmt.Printf("时间戳：%s\n", time.Unix(block.Timestamp, 0).Format("2006-01-02 03:04:05 PM"))
	fmt.Printf("上一个区块的哈希：%x\n", block.PrevHash)
	fmt.Printf("Hash：%x\n", block.Hash)
}
